Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "manojreddy"

Despite being a premium member, I'm asking for support on StackOverflow.

[https://stackoverflow.com/questions/47648086/how-to-use-caching-in-asp-net-boilerplate])

Whats next to be done?

using System.Linq;
using System.Threading.Tasks;
using Abp.Application.Services.Dto;
using Abp.Authorization;
using Abp.Runtime.Caching;
using Test.Authorization;
using Test.Caching.Dto;

namespace Test.Caching
{
    [AbpAuthorize(AppPermissions.Pages_Administration_Host_Maintenance)]
    public class CachingAppService : TestAppServiceBase, ICachingAppService
    {
        private readonly ICacheManager _cacheManager;

        public CachingAppService(ICacheManager cacheManager)
        {
            _cacheManager = cacheManager;
        }

        public ListResultDto<CacheDto> GetAllCaches()
        {
            var caches = _cacheManager.GetAllCaches()
                                        .Select(cache => new CacheDto
                                        {
                                            Name = cache.Name
                                        })
                                        .ToList();

            return new ListResultDto<CacheDto>(caches);
        }

        public async Task ClearCache(EntityDto<string> input)
        {
            var cache = _cacheManager.GetCache(input.Id);
            await cache.ClearAsync();
        }

        public async Task ClearAllCaches()
        {
            var caches = _cacheManager.GetAllCaches();
            foreach (var cache in caches)
            {
                await cache.ClearAsync();
            }
        }
    }
}
public IServiceProvider ConfigureServices(IServiceCollection services)
{
	services.AddMemoryCache();
}

Please provide sample code

Thanks for your response.

But <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Domain-Services">https://aspnetboilerplate.com/Pages/Doc ... n-Services</a> and <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Caching">https://aspnetboilerplate.com/Pages/Documents/Caching</a> are not clear. Do you have any working example with code?

Hi I'm getting 404 error for <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/Controllers/DemoUiComponentsController.cs#L24">https://github.com/aspnetzero/aspnet-ze ... ler.cs#L24</a> . Already added git user name in <a class="postlink" href="https://aspnetzero.com/LicenseManagement">https://aspnetzero.com/LicenseManagement</a> .

Good work team, thanks.

I'm using visual studio not visual studio code.

I have modified my question. Please remove your comment.

Yes,

I want to see in visual studio and like for C# code once you click on the error, it brings you to the page with the particular line also.

@alper @felixbeltran ,

Could you please explain how?

Finally I was able to find where to configure the "devtool" parameter and now rebuild time is really short.

Showing 171 to 180 of 199 entries